package day09;

public class TestUserEquals {
    public static void main(String[] args) {
        User user1 = new User(1,"tom");
        UserInfo info1 = new UserInfo(100,"这是一个好人");
        user1.setUserInfo(info1);

        User user2 = new User(1,"admin");
        UserInfo info2 = new UserInfo(100,"这是一个坏人");
        user2.setUserInfo(info2);

        System.out.println(user1 == user2);
        System.out.println(user1.equals(user2));

        System.out.println(user1.getClass());

        System.out.println(user1.getClass() == user2.getClass());
    }
}
